<?php
$uid = $_SESSION['user_id'];
if($uid){
	$data = M('Accountsinfo')
        ->where("userid = $uid")
        ->find();
    $sum1 = M("lottery_add")->where("uid = $uid")->sum('zong_money');
    $sum2 = M("lottery_ssc")->where("uid = $uid")->sum('zong_money');
    $sum3 = M("lottery_pk10")->where("uid = $uid")->sum('zong_money');
    $sum4 = M("lottery_kl8")->where("uid = $uid")->sum('zong_money');
    $sum5 = M("lottery_11x5")->where("uid = $uid")->sum('zong_money');
    $sum6 = M("lottery_fc3d")->where("uid = $uid")->sum('zong_money');

    $sum7 = M("zhui_kl8")->where("uid = $uid")->sum('zo_money');
    $sum8 = M("zhui_pk10")->where("uid = $uid")->sum('zo_money');
    $sum9 = M("zhui_ssc")->where("uid = $uid")->sum('zo_money');
    $sum10 = M("zhui_x5")->where("uid = $uid")->sum('zo_money');
    $tot = $sum1+$sum2+$sum3+$sum4+$sum5+$sum6+$sum7+$sum8+$sum9+$sum10;
}
?>
<div class="header">
	<div data-v-420a60cc="" id="HeaderTop" class="betHeader">
		<div data-v-420a60cc="" class="snav">
			<div data-v-420a60cc="" class="container">
				<div data-v-420a60cc="" class="snavAll">
					<a href="{:U('Index/index')}" class="" data-v-420a60cc=""></a>
					<ins data-v-420a60cc=""> |</ins>
					<a data-v-420a60cc="" class="betNavMore">全部彩票</a>
				</div>
				<ul data-v-420a60cc="" class="snavInfo">
					<li data-v-420a60cc="" class="userName MsgShow">
                            <a data-v-420a60cc="" class="_personalInfo">
                                <img data-v-420a60cc="" alt="" src="{$data.avatar}">
                                <i data-v-420a60cc=""><?php echo $data['nickname'];?></i>
                            </a>
                            <span data-v-420a60cc="" id="unreadMsgNum" onclick="window.location=&#39;letter&#39;">0</span>
                            <div data-v-420a60cc="" class="messageShow messageShowContent" style="display: none;">
                                <i data-v-420a60cc=""></i>
                                <dl>
                                    <dt><a href="javascript:;" class="" style="float: left;" data-v-420a60cc="">我的未读消息（<small style="color: #f06701;">0</small>）</a><a href="javascript:;" class="" data-v-420a60cc="" style="float: right">更多</a></dt>
                                </dl>
                            </div>
						</li>
                        <li data-v-420a60cc="" class="HoverShow">
						<a href="{:U('Users/securityCenter')}" class="curr" data-v-420a60cc="">我的账户 
						<i data-v-420a60cc="" class="iconfont"></i></a>
                            <div data-v-420a60cc="" class="accountList HoverShowContent" style="display: none;">
								<i data-v-420a60cc=""></i> 
								<a href="{:U('Users/BetRecord')}" class="" data-v-420a60cc="">投注记录</a>
								<a href="{:U('Users/BillRecord')}" class="" data-v-420a60cc="">交易记录</a> 
								<a href="{:U('Users/personalInfo')}" class="" data-v-420a60cc="">个人信息</a> 
								<a href="{:U('Users/securityCenter')}" class="curr" data-v-420a60cc="">安全中心</a>
                            </div>
                        </li>
                        <li data-v-420a60cc="">余额：
							<span data-v-44d9ce90="" class="GetMoney getMoney ds">
								<em data-v-44d9ce90=""><span id="umon">
                                     <?php if($data['money'] == .000){echo "0.00";}else{echo sprintf("%.2f",$data['money']);} ?>
                                    </span></em>
								<i data-v-44d9ce90="" id="icon" class="iconfont" onclick="dd(this.id)"></i>
								<i data-v-44d9ce90=""><span onclick="yin()">隐藏</span></i>
							</span>
                            <span data-v-420a60cc="" class="ShowMoney showMoney ns" style="display:none;">已隐藏
								<i data-v-420a60cc=""><span onclick="xian()">显示</span></i>
							</span>
						</li>
                        <li data-v-420a60cc="">
							<a href="{:U('Index/ebankPay')}" class="" data-v-420a60cc="">充值</a></li>
                        <li data-v-420a60cc="">
							<!--<a href="{:U('Index/withdraw')}" class="" data-v-420a60cc="">提现</a></li>-->
							<a href="javascript:;" class="tixan" data-v-420a60cc="">提现</a></li>
                        <li data-v-420a60cc="" class="LoginOut"><a class="fx_a_fff" href="{:U('Index/logout')}">退出</a></li>
						
				</ul>
			</div>
            <div data-v-3191fb32="" class="cardBox fx_cardBox1" data-v-420a60cc="" style="top: 35px; display: none;">
                <div data-v-3191fb32="" class="card fix">
                    <div data-v-3191fb32="" class="cardLeft">
                        <img data-v-3191fb32="" src="{$data.avatar}" alt="" width="80" height="80">
                        <if condition="$data.nickname eq '' "><h6 data-v-3191fb32=""> 昵称未设置</h6>
                            <else /> <h6 data-v-3191fb32=""> {$data.nickname}</h6>
                        </if>
                    </div>
                    <div data-v-3191fb32="" class="cardInfo">
                        <ul data-v-3191fb32="">
                            <li data-v-3191fb32="">性别：
							<if condition="$data.sex eq 1 "> 男
							 <elseif condition="$data.sex eq 2"/>女
							 <else /> 保密
							 </if>
							</li>
                            <li data-v-3191fb32="">账号：{$data.accounts}</li>
                            <li data-v-3191fb32="">等级：
							<?php if($data['score'] < '10'){echo 'VIP1';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo 'VIP2';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo 'VIP3';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo 'VIP4';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo 'VIP5';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo 'VIP6';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo 'VIP7';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo 'VIP8';}
                                  elseif('5000000' <= $data['score']){echo 'VIP9';}; 
							?>
							</li>
                            <li data-v-3191fb32="">头衔：
							<?php if($data['score'] < '10'){echo '农民';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo '地主';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo '知县';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo '通判';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo '知府';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo '总督';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo '巡抚';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo '丞相';}
                                  elseif('5000000' <= $data['score']){echo '帝王';}; 
							?>
							</li>
                            <li data-v-3191fb32="">累计中奖：{$tot}</li>
                        </ul>
                    </div>
                    <ul data-v-3191fb32="" class="cardIcon fix">
                        <li data-v-3191fb32="" id="1">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont L_K3"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_SSC"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_SYX5"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_PK10"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_KL8"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="1">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont L_FC3D"></i></a>
                        </li>
                        <li data-v-3191fb32="" id="B">
                            <a data-v-3191fb32=""><i data-v-3191fb32="" class="iconfont  L_PL35"></i></a>
                            <!--灰色时加类名 noActive-->
                        </li>
                    </ul>
                </div>
            </div>
		</div>
	</div>
	<!----> <!----></div>
<!--header end-->
<div data-v-72cdd821="" class="container bet" s="[object Object]">
	<table data-v-72cdd821="" class="betMoreList" style="display: none;">
		<tbody data-v-72cdd821="">
		<tr data-v-72cdd821="">
			<th data-v-72cdd821="" style="width: 214px;">快3</th>
			<th data-v-72cdd821="">时时彩</th>
			<th data-v-72cdd821="">快乐彩</th>
			<th data-v-72cdd821="">11选5</th>
			<th data-v-72cdd821="">低频彩</th>
		</tr>
		<tr data-v-72cdd821="">
			<td data-v-72cdd821="">
				<a href="{:U('Lottery/jiangsu')}" class="" data-v-72cdd821="">江苏快3</a>
				<a href="{:U('Lottery/anhui')}" class="" data-v-72cdd821="">安徽快3</a>
				<a href="{:U('Lottery/guangxi')}" class="" data-v-72cdd821="">广西快3</a>
				<a href="{:U('Lottery/hubei')}" class="" data-v-72cdd821="">湖北快3</a>
				<a href="{:U('Lottery/beijing')}" class="" data-v-72cdd821="">北京快3</a>
				<a href="{:U('Lottery/hebei')}" class="" data-v-72cdd821="">河北快3</a>
				<a href="{:U('Lottery/gansu')}" class="" data-v-72cdd821="">甘肃快3</a>
				<a href="{:U('Lottery/shanghai')}" class="" data-v-72cdd821="">上海快3</a>
				<a href="{:U('Lottery/guizhou')}" class="" data-v-72cdd821="">贵州快3</a>
				<a href="{:U('Lottery/jilin')}" class="" data-v-72cdd821="">吉林快3</a>
			</td>
			<td data-v-72cdd821="">
				<a href="{:U('Lottery/cqssc')}" class="" data-v-72cdd821="">重庆时时彩</a>
				<a href="{:U('Lottery/xjssc')}" class="" data-v-72cdd821="">新疆时时彩</a>
				<a href="{:U('Lottery/tjssc')}" class="" data-v-72cdd821="">天津时时彩</a>
				<a href="{:U('Lottery/aiji')}" class="" data-v-72cdd821="">埃及二分彩</a>
			</td>
			<td data-v-72cdd821="">
				<a href="{:U('Lottery/kl8')}" class="" data-v-72cdd821="">北京快乐8</a>
				<a href="{:U('Lottery/pk10')}" class="" data-v-72cdd821="">北京PK10</a>
			</td>
			<td data-v-72cdd821="">
				<a href="{:U('Lottery/gdx5')}" class="" data-v-72cdd821="">广东11选5</a>
				<a href="{:U('Lottery/shx5')}" class="" data-v-72cdd821="">上海11选5</a>
				<a href="{:U('Lottery/sdx5')}" class="" data-v-72cdd821="">山东11选5</a>
				<a href="{:U('Lottery/jxx5')}" class="" data-v-72cdd821="">江西11选5</a>
			</td>
			<td data-v-72cdd821="">
				<a href="{:U('Lottery/fc3d')}" class="" data-v-72cdd821="">福彩3D</a>
				<a href="{:U('Lottery/pl3')}" class="" data-v-72cdd821="">排列3</a>
			</td>
		</tr>
		</tbody>
	</table>
	<div id="layermbox211" class="layermbox layermbox0 layermshow" index="2"><div class="laymshade"></div><div class="layermmain"><div class="section"><div class="layermchild layerConfirm width380 layermanim"><h3 style="">温馨提示</h3><button class="layermend"></button><div class="layermcont">您还未设置安全密码和绑定银行卡，无法提现，是否先去设置安全密码?</div><div class="layermbtn"><span type="0">否</span><span type="1" class="shi">是</span></div></div></div></div></div>
<script>
var uuid = '<?php echo $uid;?>';
	    function yin(){
			$(".ds").hide();
			$(".ns").show();
		}
		function xian(){
			$(".ds").show();
			$(".ns").hide();
		}
        function dd(ong){
            $("#"+ong).addClass("refreshMove");
            setTimeout(function(){
                $("#"+ong).removeClass("refreshMove");
            },1000);

			$.ajax({
	             type: "POST",
	             url: "{:U('Users/get_money')}",
	             data: {uuid:uuid},
	             success: function(dat){
	            	 var dataObj = eval("("+dat+")");
                     $('#umon').empty();   //清空resText里面的所有内容
                     $('#umon').html(dataObj.money);
                  }
	         });
		}


    $(function(){
        hover1();
        function hover1(){
            var k = 2;
            var BOX = $(".messageShowContent");
            $("#unreadMsgNum").hover(function(){
                BOX.show();
            },function(){

                setTimeout(function(){
                    if(k == 1){
                        BOX.show();
                    }else{
                        BOX.hide();
                    }
                },100)
            });
            BOX.hover(function(){
                k = 1;
            },function(){
                BOX.hide();
                k = 2;
            })
        }
        hover2();
        function hover2(){
            var k = 2;
            var L = ($(window).width()-1000)/2+260;
            var BOX = $(".fx_cardBox1");
            BOX.css("left",L);
            $("._personalInfo").hover(function(){
                BOX.show();
            },function(){

                setTimeout(function(){
                    if(k == 1){
                        BOX.show();
                    }else{
                        BOX.hide();
                    }
                },100)
            });
            BOX.hover(function(){
                k = 1;
            },function(){
                BOX.hide();
                k = 2;
            })
        }
    })
	
		
	$(".tixan").click(function(){
        $.ajax({
             type: "POST",
             url: "{:U('Users/is_bang')}",
             data: {uuid:uuid},
             success: function(dat){
                 if(dat=='1'){
                    $("#layermbox211").show();
                 }else if(dat=='2'){
                    $("#layermbox212").show();
                 }else if(dat=='3'){

                 }else{
                    location.href = "{:U('Index/withdraw')}";
                 }
              }
         });
    })
    $("#layermbox211 .shi").click(function(){
        location.href = "{:U('Users/setSafePwd',array('is_bang'=>1))}";
    })
    $("#layermbox212 .shi").click(function(){
        location.href = "{:U('Users/manageBankcard2')}";
    })
</script>